As cameras, gyroscopes, accelerometers, distance sensors, and other devices have been widely applied to terminals, application programs can use these devices that provide real-time information to achieve new functions or to achieve existing functions in a brand-new manner. In some implementations, when the real-time information changes, a display object on a screen can be made to change accordingly, which leads to interaction with a user and brings an intuitive and novel experience to the user.
In these implementations, in addition to that a display object itself can change along with the real-time information, the display location of the display object on the screen can also be made to change according to the real-time information. For example, the location where a ball is to be displayed on a screen can be determined according to the location of a user's hand in a real-time video, as if the user holds the ball in hand.
In current technologies, an application program extracts, for a period, real-time information that is output from a sensor or another device, maps the real-time information to a corresponding display location on a screen according to a preset algorithm, and displays a display object at the display location on the screen. As such, when the real-time information changes from period to period, the display object will be displayed at a new display location on the screen and move once in each period, and it looks as if the display object moves step by step.
According to such implementation manner, the location of the display object on the screen changes greatly when relatively large changes occur to the real-time information, and it looks as if the display object jumps on the screen; when the real-time information experiences very small changes for several periods in a row, it looks as if the display object is shaking on the screen. The display effect is undesirable in both situations.